package com.lovo.util.dto;

import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter
public enum ResultStatus {
    SUCCESS("200", "OK"),

    NULL("001", "结果为空"),

    SERVER_ERROR("500", "服务器错误"),

    BAD_REQUEST("400", "错误的请求"),
    ;

    /**
     * 返回的HTTP状态码,  符合http请求
     */
    private HttpStatus httpStatus;
    /**
     * 业务状态码
     */
    private String code;
    /**
     * 业务异常信息描述
     */
    private String message;

    /*ResultStatus (HttpStatus httpStatus,String code,String message){
        this.httpStatus=httpStatus;
        this.code=code;
        this.message=message;
    }*/
    ResultStatus(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
